/**
 * This program is free software but WITHOUT ANY WARRANTY OR CONDITIONS OF ANY KIND.
 *
 * Copyright (C) 2008-2012 www.pretty-tools.com
 */

try
{
    var WSSH_ContextMenuListener = new wsshContextMenuListener();
    var WSSH_BrowserListener = new wsshBrowserListener();

    addEventListener("load", function(event) {
        try
        {
            g_wsshImageResolver.init();

            WSSH_ContextMenuListener.onLoad(event);
            WSSH_BrowserListener.onLoad(event);

            wsshRulesUpdateManager.checkForPredefinedRulesUpdate();
        }
        catch(ex)
        {
            dump("Exception on load (WebSlideShow-Overlay.js): " + ex + "\n");
        }
    }, false);

    addEventListener("unload", function(event) {
        try
        {
            WSSH_ContextMenuListener.onUnLoad(event);
            WSSH_BrowserListener.onUnLoad(event);
            g_wsshImageResolver.destroy();
        }
        catch(ex)
        {
            dump("Exception on unload (WebSlideShow-Overlay.js): " + ex + "\n");
        }
    }, false);
}
catch(ex)
{
    dump("Exception on inilializing WebSlideShow-Overlay.js: " + ex + "\n");
}
